package com.ezops.models;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
@Entity
@Table(name="EZOPS_FIELDS")
public class EzopsFields implements Comparable<EzopsFields> , DomainEntity{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="FIELD_ID")
	private int ezopsFieldId;
	
	@Column(name="FIELD_NAME")
	private String ezopsFieldName;
	
	
	
	public String getId() {
		return String.valueOf(ezopsFieldId);
	}
	public void setId(int ezopsFieldId) {
		this.ezopsFieldId = ezopsFieldId;
	}
	public String getEzopsFieldName() {
		return ezopsFieldName;
	}
	public void setEzopsFieldName(String ezopsFieldName) {
		this.ezopsFieldName = ezopsFieldName;
	}
	@Override
	public int compareTo(EzopsFields o) {
		return this.ezopsFieldName.toLowerCase().compareTo(o.getEzopsFieldName().toLowerCase());
	}
	
	@Transient
	public int getEzopsFieldId() {
		return ezopsFieldId;
	}
	
	@Transient
	public void setEzopsFieldId(int ezopsFieldId) {
		this.ezopsFieldId = ezopsFieldId;
	}

}
